package com.pactera.madp.cp.api.em.product;

/**
 * WorkMassEnum
 *
 * @author jun
 * @version 1.0
 * 2021/7/29 18:10
 **/
public enum ProductPhotoEnum {


    LI_CAI(11,"/mfs/licai.png"),
    JI_JIN(12,"/mfs/jijin.png"),
    BAO_XIAN(13,"/mfs/baoxian.png"),
    SI_MU(16,"/mfs/simu.png");


    private Integer code;
    private String msg;

    ProductPhotoEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    /**
     * 根据 code 值获取对应的msg
     * @param code
     * @return msg
     */
    public static String getTypeByCode(Integer code) {
        ProductPhotoEnum[] values = values();
        for (ProductPhotoEnum e : values) {
            if (e.getCode().equals(code)) {
                return e.getMsg();
            }
        }
        return "";
    }
}
